import proxy from '../config/host';

const savePlayerLocaDataService = (data) => {
    return new Promise((resolve, reject) => {
        fetch(proxy.development.API + '/api/v1/temp_api/game/startGame', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify(data)
        })
            .then(response => response.json())
            .then(data => {
                if (data.code == 200) resolve(data.message);
            })
            .catch(error => {
                console.error('Error:', error);
                reject(error);
            });
    });
};


export {
    savePlayerLocaDataService
};